package file;

import java.io.File;

public class FileDemo {
    public static void main(String[] args) {
        File file=new File("E:\\JAVA\\2023.2.10/demo.txt");
        String name = file.getName();
        System.out.println("文件名为"+name);

        Long len=file.length();
        System.out.println("长度为："+len);

        boolean a1=file.isFile();
        System.out.println(a1);
        boolean a2=file.canRead();
        boolean a3=file.isHidden();
        boolean a4=file.canWrite();
        System.out.println(a2);
        System.out.println(a3);
        System.out.println(a4);


    }
}
